﻿using FluentNHibernate.Mapping;

namespace NMA.Infrastructure.NHibernate.Mapping
{
    using NMA.Infrastructure.NHibernate.DomainObject;

    public class ResourceMap : ClassMap<Resources>
    {
        public ResourceMap()
        {
            Table("[NMA].[dbo].[Resources]");
            Id(x => x.Id, "ID").GeneratedBy.Guid();
            Map(x => x.ResourceType, "ResourceType").Not.Nullable();
            Map(x => x.CultureCode, "CultureCode").Not.Nullable();
            Map(x => x.ResourceKey, "ResourceKey").Not.Nullable();
            Map(x => x.ResourceValue, "ResourceValue").Not.Nullable();
            Map(x => x.CreatedDate, "CreatedDate").Not.Nullable();
            Map(x => x.UpdatedDate, "UpdatedDate");
            Map(x => x.CreatedUser, "CreatedUser").Not.Nullable().Length(30);
            Map(x => x.UpdatedUser, "UpdatedUser").Length(30);
        }
    }
}